import request from "@/utils/request.js"
//获取热门酒店信息
export const getPubList=(id)=>request.get('scs/get-list?id='+id)

//根据品牌获取酒店信息
export const getPubListByBrand=(area,id)=>request.get('scs/get-brandList?area='+area+'&brand='+id)

//根据Id获取酒店信息
export const getPubDetailByPubId=(id)=>request.get('scs/get-pubDetail?pubId='+id)

//根据城市,品牌,星级获取酒店列表
export const getPubListBycbs=(area,brand,rank)=>request.get('scs/get-areaList?area='+area+'&brand='+brand+'&rank='+rank)

//根据酒店id查询酒店房间信息列表
export const getRoomListByPubId=(id)=>request.get('scs/get-pubRoomList?pubId='+id)

//根据房间id查询房间详情
export const getRoomDetailByRoomId=(id)=>request.get('scs/get-pubRoom?roomId='+id)

//提交酒店订单
export const submitOrder=(data)=>request.post('insert-order',data)

//添加酒店收藏
export const addCollect=(pubId)=>request.post(`sc/add-collection?type=2&cid=${pubId}`)

//添加景点收藏
export const addCollectByScenic=(id)=>request.post(`sc/add-collection?type=1&cid=${id}`)

//查询每个酒店的平均评分
export const getPubScore=(id)=>request.get('pubcomment/avgScore?pid='+id)

//查询每个酒店不同评分的人数
export const scorePeopleNum=(id)=>request.get('pubcomment/scoreNum?pid='+id)